@extends('plugin.hostserver.front.layout.base')
@section('content')
    <div id="pageTitle" class="HeaderAdjust" data-bg-src=""
         style="background-image: url(&quot;&quot;); margin-top: 220px;">
        <div class="container">
            <div class="row">
                <div class="col-md-12 ">
                    <div class="section-title">
                        <h2 style="font-size: 16px">{{ $show->name }}</h2>
                    </div>

                </div>
            </div>
        </div>
    </div>
    <div class="" style="margin: 30px 0">
        <div class="container">
            {!! $show->content !!}
        </div>
    </div>
@endsection
@section('foot_js')
    <script>
        $(function () {
            var good_id = '{{ $show->id }}';
            $("#system_name").change(function () {
                var id = $(this).find('option:selected').data('id');
                console.log(id);
                if (id) {
                    ajax(urlConfigApi.system, {id: id, good_id: good_id}, function (res) {
                        if (res.code == 200) {
                            var html = '';
                            for (var i in res.data) {
                                var item = res.data[i];
                                html += '<option value="' + item.name + '">' + item.name + '</option>'
                            }
                            $("#system_detail").empty().append(html);
                        } else {
                            $("#system_detail").empty();
                        }
                    })
                }
            })
            total();
            $("#month").keyup(function(){
                var month=$(this).val();

                if(!isNaN(month))
                {
                    total();
                }
            })
            //计算价格
            function total(){
                var month=$("#month").val();
                var money="{{$show->money}}";
                $("#count_money").text(money*month);
            }
        })
    </script>

@endsection